import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';

@Plugin({
  pluginName: 'AppShortcut',
  plugin: 'cordova-plugin-appshortcut', // npm package name, example: cordova-plugin-camera
  pluginRef: 'plugins.appShortcut',  //必须跟 platforms/android/assets/cordova_plugins.js中的clobbers的变量名称一致，区分大小写
  platforms: ['Android'], // Array of platforms supported, example: ['Android', 'iOS']
})
@Injectable()
export class AppShortcut extends IonicNativePlugin {

  /**
   * This function does something
   * @return {Promise<any>} Returns a promise that resolves when something happens
   */
  @Cordova()
  shortcuts(): Promise<any> {
    return; // We add return; here to avoid any IDE / Compiler errors
  }

}